package models

import "gorm.io/gorm"

type User struct {
	gorm.Model
	Username string `gorm:"type:varchar(30)"`
	Password string `gorm:"type:varchar(32)"`
}

type Role struct {
	gorm.Model
	RoleName string `gorm:"type:varchar(30)"`
}

type Node struct {
	gorm.Model
	NodeName string `gorm:"type:varchar(30)"`
}

type UserRole struct {
	gorm.Model
	Uid int `gorm:"type:int"`
	Rid int `gorm:"type:int"`
}

type RoleNode struct {
	gorm.Model
	Rid int `gorm:"type:int"`
	Nid int `gorm:"type:int"`
}

type Car struct {
	gorm.Model
	CarName  string `gorm:"type:varchar(30)"`
	CarCode  string `gorm:"type:varchar(30)"`
	CarPrice string `gorm:"type:varchar(30)"`
	Tid      int    `gorm:"type:int"`
}

type CarType struct {
	gorm.Model
	TypeName    string `gorm:"type:varchar(30)"`
	TypeComment string `gorm:"type:varchar(30)"`
}

type CarList struct {
	CarId       int    `gorm:"type:int"`
	CarName     string `gorm:"type:varchar(30)"`
	CarCode     string `gorm:"type:varchar(30)"`
	CarPrice    string `gorm:"type:varchar(30)"`
	TypeName    string `gorm:"type:varchar(30)"`
	TypeComment string `gorm:"type:varchar(30)"`
}

type CarData struct {
	gorm.Model
	CarName string `gorm:"type:varchar(30)"`
	CarCode string `gorm:"type:varchar(30)"`
	CarType string `gorm:"type:varchar(30)"`
	Cid     int    `gorm:"type:int"`
}

type Contract struct {
	gorm.Model
	ContractCode  string `gorm:"type:varchar(30)"`
	ContractName  string `gorm:"type:varchar(30)"`
	ContractPrice int    `gorm:"type:int"`
}

type CarCon struct {
	ConId         int
	CarName       string `gorm:"type:varchar(30)"`
	CarCode       string `gorm:"type:varchar(30)"`
	CarType       string `gorm:"type:varchar(30)"`
	ContractCode  string `gorm:"type:varchar(30)"`
	ContractName  string `gorm:"type:varchar(30)"`
	ContractPrice int    `gorm:"type:int"`
}

type Per struct {
	gorm.Model
	PerCode    string `gorm:"type:varchar(30)"`
	PerName    string `gorm:"type:varchar(30)"`
	PerAddress string `gorm:"type:varchar(30)"`
}

type PerOrder struct {
	gorm.Model
	OrderCode string `gorm:"type:varchar(30)"`
	OrderName string `gorm:"type:varchar(30)"`
	Pid       int    `gorm:"type:int"`
}

type PerOrderList struct {
	OrderId    int    `gorm:"type:int"`
	PerCode    string `gorm:"type:varchar(30)"`
	PerName    string `gorm:"type:varchar(30)"`
	PerAddress string `gorm:"type:varchar(30)"`
	OrderCode  string `gorm:"type:varchar(30)"`
	OrderName  string `gorm:"type:varchar(30)"`
}

type Good struct {
	gorm.Model
	GoodCode  string `gorm:"type:varchar(30)"`
	GoodName  string `gorm:"type:varchar(30)"`
	GoodPrice int    `gorm:"type:int"`
}

type GoodOrder struct {
	gorm.Model
	OrderCode  string `gorm:"type:varchar(30)"`
	OrderName  string `gorm:"type:varchar(30)"`
	OrderPrice int    `gorm:"type:int"`
	Gid        int    `gorm:"type:int"`
}

type GoodOrderList struct {
	OrderId    int
	GoodCode   string `gorm:"type:varchar(30)"`
	GoodName   string `gorm:"type:varchar(30)"`
	GoodPrice  int    `gorm:"type:int"`
	OrderCode  string `gorm:"type:varchar(30)"`
	OrderName  string `gorm:"type:varchar(30)"`
	OrderPrice int    `gorm:"type:int"`
}

type House struct {
	gorm.Model
	HouseCode string `gorm:"type:varchar(30)"`
	HouseName string `gorm:"type:varchar(30)"`
	HouseTo   string `gorm:"type:varchar(30)"`
}

type HouseOrder struct {
	gorm.Model
	OrderCode  string `gorm:"type:varchar(30)"`
	OrderNum   int    `gorm:"type:int"`
	OrderPrice int    `gorm:"type:int"`
	Hid        int    `gorm:"type:int"`
}

type HouseOrderList struct {
	OrderId    int    `gorm:"type:int"`
	HouseCode  string `gorm:"type:varchar(30)"`
	HouseName  string `gorm:"type:varchar(30)"`
	HouseTo    string `gorm:"type:varchar(30)"`
	OrderCode  string `gorm:"type:varchar(30)"`
	OrderNum   int    `gorm:"type:int"`
	OrderPrice int    `gorm:"type:int"`
}
